package beans;

import java.io.Serializable;
import java.util.List;

public class AnalysisInformation implements Comparable<AnalysisInformation>, Serializable {
	private Move move;
	private boolean deeplyAnalized;
	private int mate;
	private int score;
	private int differenceScoreBestMove=0;
	private int timeAnalysis=0;
	private boolean bookMove;
	private List<Move> bestContinuation;
	private int scoreUpperBound;
	private int scoreLowerBound;
	
	
	public int getTimeAnalysis() {
		return timeAnalysis;
	}


	public void setTimeAnalysis(int timeAnalysis) {
		this.timeAnalysis = timeAnalysis;
	}


	public boolean isBookMove() {
		return bookMove;
	}


	public void setBookMove(boolean bookMove) {
		this.bookMove = bookMove;
	}


	public AnalysisInformation(Move move, int mate,
			int score, int timeAnalysis,
			boolean bookMove, List<Move> bestContinuation, int scoreUpperBound,
			int scoreLowerBound) {
		super();
		this.move = move;		
		this.mate = mate;
		this.score = score;		
		this.timeAnalysis = timeAnalysis;
		this.bookMove = bookMove;
		this.bestContinuation = bestContinuation;
		this.scoreUpperBound = scoreUpperBound;
		this.scoreLowerBound = scoreLowerBound;
	}


		
	public boolean isDeeplyAnalized() {
		return deeplyAnalized;
	}
	
	public void setDeeplyAnalized(boolean deeplyAnalized) {
		this.deeplyAnalized = deeplyAnalized;
	}

	public int getDifferenceScoreBestMove() {
		return differenceScoreBestMove;
	}

	public void setDifferenceScoreBestMove(int differenceScoreBestMove) {
		this.differenceScoreBestMove = differenceScoreBestMove;
	}

	public Move getMove() {
		return move;
	}
	public void setMove(Move move) {
		this.move = move;
	}	

	public int getMate() {
		return mate;
	}
	public void setMate(int mate) {
		this.mate = mate;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	public List<Move> getBestContinuation() {
		return bestContinuation;
	}
	public void setBestContinuation(List<Move> bestContinuation) {
		this.bestContinuation = bestContinuation;
	}
	
	public String toString() {
		return "AnalysisInformation [Color=" + move.getPiece().getColor() +", move=" + move.getShortAlgebraicNotation() + ", mate=" + mate
				+ ", score=" + score + ", bestContinuation=" + bestContinuation
				+ "]";
	}

	
	public int compareTo(AnalysisInformation arg0) {		
		return Integer.valueOf(arg0.getDifferenceScoreBestMove()).compareTo(Integer.valueOf(differenceScoreBestMove));
	}
	
	
	
}
